﻿<navigation:Page 
        x:Class="PermDoc.PageDeepZoom" 
        mc:Ignorable="d"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
        d:DesignWidth="1024"
        d:DesignHeight="800"
        VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
        Title="PageDeepZoom Page" Loaded="Page_Loaded" Unloaded="Page_Unloaded">
    
    <Grid 
        x:Name="LayoutRoot"
        Width="1024" Height="550"
        MinWidth="800" MinHeight="780"
        MaxWidth="2024" MaxHeight="800"
        VerticalAlignment="Top" HorizontalAlignment="Left"
        >

        <Grid.RowDefinitions>
            <RowDefinition Height="5" />
            <RowDefinition Height="70" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="40" />
            <ColumnDefinition Width="*" MinWidth="1024" />
            <ColumnDefinition Width="10" />
        </Grid.ColumnDefinitions>

        <ScrollViewer 
            Grid.Row="1" Grid.Column="1" 
            HorizontalAlignment="Left" VerticalAlignment="Top"
            Width="600" Height="68"
            HorizontalScrollBarVisibility="Auto">
            
            <StackPanel 
                VerticalAlignment="Top" HorizontalAlignment="Left"
                >

<HyperlinkButton 
                    Name ="oBtnOpenDocInBrowser"
                    IsEnabled="False"
                    TargetName="_blank"
                    Content="Открыть документ в браузере" />

                <TextBlock 
                    Name="oTxtNo"
                    Text="{Binding Path=No, StringFormat='No - \{0\}'}" />
                <TextBlock 
                    Name="oTxtDocDate"
                    Text="{Binding Path=Дата_Док, Mode=OneWay, StringFormat='Дата док-тa - dd.MM.yyyy'}" />
                <TextBlock 
                    Name="oTxtDocCreated"
                    Text="{Binding Path=Создан, Mode=OneWay, StringFormat='Создан - dd.MM.yyyy hh:mm:ss'}" />
                <TextBlock 
                    Name="oTxtDocAuthor"
                    Text="{Binding Path=Автор, StringFormat='Автор - \{0\}'}" />
                <TextBlock 
                    Name="oTxtDocModify"
                    Text="{Binding Path=Изменён, Mode=OneWay, StringFormat='Изменён - dd.MM.yyyy hh:mm:ss'}" />
                <TextBlock 
                    Name="oTxtDocEditor"
                    Text="{Binding Path=Редактор, StringFormat='Редактор - \{0\}'}" />
                <TextBlock 
                    Name="oTxtDocState"
                    Text="{Binding Path=Статус, StringFormat='Статус - \{0\}'}" />
                <TextBlock 
                    Name="oTxtDocShop"
                    Text="{Binding Path=Магазин, StringFormat='Магазин - \{0\}'}" />
                <TextBlock 
                    Name="oTxtDocKontr"
                    Text="{Binding Path=Контрагент, StringFormat='Контрагент - \{0\}'}" />
                <TextBlock 
                    Name="oTxtDocNo_Doc"
                    Text="{Binding Path=N_Док, StringFormat='N_Док - \{0\}'}" />
                
            </StackPanel>
            
        </ScrollViewer>

        <StackPanel 
            Grid.Row="2" Grid.Column="0">
            <Image Source="/PermDoc;component/Img/home.png" MouseLeftButtonUp="Home_Click" />
            <Image Source="/PermDoc;component/Img/zoomin.png" MouseLeftButtonUp="ZoomIn_Click" />
            <Image Source="/PermDoc;component/Img/zoomout.png" MouseLeftButtonUp="ZoomOut_Click" />
        </StackPanel>
                    
        
        <StackPanel 
            Grid.Row="2" Grid.Column="1" 
            Orientation="Vertical" 
            HorizontalAlignment="Left" VerticalAlignment="Top"
            >

            <MultiScaleImage
                Name="oDeepZoom" 
                Height="Auto" Width="Auto"
                HorizontalAlignment="Center" VerticalAlignment="Center" MouseLeftButtonDown="oDeepZoom_MouseLeftButtonDown" MouseLeftButtonUp="oDeepZoom_MouseLeftButtonUp" MouseMove="oDeepZoom_MouseMove" ImageOpenSucceeded="oDeepZoom_ImageOpenSucceeded" MotionFinished="oDeepZoom_MotionFinished">
                
            </MultiScaleImage>
            
        </StackPanel>

    </Grid>
    
</navigation:Page>
